package GameMain.Model
{
	import GameMain.View.PTGame.GameManager;
	
	import flash.display.Sprite;

	public class EntityNPC extends Entity
	{
		private var _npcID:int = 0;
		
		public function EntityNPC()
		{
			super();
		}
		
		public function setNPCid(npcID:int):void
		{
			this._npcID = npcID;
			if(this._npcID == 1002 || this._npcID == 1003 || this._npcID == 1004)
			{
				this._playerProfession = this._npcID - 1001;
				super.initModel();
			}
			else
			{
				this.initModel();
			}
			
			this.setPlayerName("EntityID:"+String(this._entityID));
		}
		
		override public function initModel():void
		{
			var npcMDClass:Class = GameManager.getNpcClass(this._npcID);
			var npcMD:Sprite = new npcMDClass as Sprite;
			this.setMC(npcMD);
			this.playAction(Entity.ACTION_STAND);
		}
		
	}
}